package CollectionsFramework;

import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;

public class LinkedHashMapTest {

    public static void main(String[] args){
        Map<String,String> map = new LRU<>();
        map.put("m","abc");
        map.put("a","abc");
        map.put("g","bcd");
        map.put("s","cde");
        map.put("z","def");

        Iterator<Map.Entry<String, String>> iterator = map.entrySet().iterator();
        while (iterator.hasNext()){
            Map.Entry<String, String> next = iterator.next();
            System.out.println(next.getKey());
            System.out.println(next.getValue());
        }


    }
}